<?php namespace Home\Model;

use Hdphp\Model\Model;

class News extends Model
{
	protected $table='news';

	//自动验证
	protected $validate = array( 
        array('title','required','标题不能为空',self::􏴮􏶸􏴯􏲗􏱀􏲗􏳫􏶹􏲣􏲔􏴯􏰣􏲣􏱀􏴮􏱋MUST_VALIDATE,self::MODEL_BOTH)
    ); 
	
	public function storage()
	{
		if($this->create())
		{
			return $this->add();
		}
	}
}